﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Newtonsoft.Json;

namespace Guide.Handlers
{
    /// <summary>
    /// Summary description for GetAJson
    /// </summary>
    public class GetAJson : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            Dictionary<string, string> dInfo = new Dictionary<string, string>();
            dInfo.Add("EnglishName", "William");
            dInfo.Add("ChinaName", "WangJiBin");
            string json = JsonConvert.SerializeObject(dInfo);
            context.Response.Write(json);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}